package com.twu.bm.football;

import org.junit.Test;

import java.io.PrintStream;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

public class CoachTest {

    PrintStream printStream = mock(PrintStream.class);

    String coachName = "Joe Black";
    String teamName = "Bengals";
    String title = "Assistant Coach";
    Coach coach = new Coach(coachName, teamName, title);

    @Test
    public void shouldPrintNameWhenPrintCalled() {
        coach.print(printStream);
        verify(printStream).println(coachName);
    }

    @Test
    public void shouldPrintTeamWhenPrintCalled() {
        coach.print(printStream);
        verify(printStream).println(teamName);
    }

    @Test
    public void shouldPrintTitleWhenPrintCalled() {
        coach.print(printStream);
        verify(printStream).println(title);
    }
}
